Read Mail
AutomatR.Office365.Activities.ReadMail
The "Read Mail" activity in AutomatR is part of the Office 365 activities package, enabling automation workflows to fetch and process emails from a specified Office 365 account. This activity utilizes the Microsoft Office message API to retrieve email messages based on specified criteria.
Properties
Name | Description |
---|---|
Input | |
Body | Specifies the body of the email you want to read. String variables containing the body content of the email. |
From | Specifies the email ID of the sender for the email you want to read. String variables containing the email ID. |
Has Attachments | Specifies whether the email should have attachments. Boolean variables indicating whether the email should have attachments. |
Subject | Specifies the subject line of the email you want to read. String variables containing the subject of the email. |
Top | Specifies the number of top emails to retrieve. Integer variables containing the number of top emails. |
UnRead Only | Specifies whether to retrieve only unread emails. Boolean variables indicating whether to retrieve only unread emails. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Read Mail" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Messages | Outputs the result as a List of Mail Messages, enabling you to use it for further activities. Variables of type List<MailMessage> to store the retrieved email messages. |
How to use:
- Drag and drop the "Read Mail" activity onto the workflow.
- Configure the properties by specifying the criteria such as subject, body, sender email, etc., for filtering the emails.
- Optionally, configure the delay and customize the display name.
- Execute the workflow to fetch the specified emails based on the criteria.
Example: Consider an example where the "Read Mail" activity is used to retrieve the top 5 unread emails with attachments:
Read Mail:
Display Name: "Read Unread Emails with Attachments"
Top: 5
UnRead Only: True
Has Attachments: True
(Other Criteria as needed)
Messages: retrievedEmails
In this example, the activity fetches the top 5 unread emails with attachments based on the specified criteria. The retrieved emails are stored in the retrievedEmails
variable of type List<MailMessage>
for further processing in the workflow.